import { IsString } from "class-validator";
import { BaseEntity } from "../BaseEntity";
import { Model } from "sequelize";

export default class attachmentManageEntity extends BaseEntity {
  id?: number;
  
  @IsString()
  public name: string;

  @IsString()
  public  code: string;

  @IsString()
  public  url: string;

  public static transform(plainObject: object): attachmentManageEntity {
    return super.baseTransform(attachmentManageEntity, plainObject);
  }
}

export interface IattachmentManageModel extends Model<attachmentManageEntity> {}

/**
 * 导入的字段映射对象
 */
export const importFieldMap: Omit<attachmentManageEntity, "validateThis"> = {
  name: "name", code: " code", url: " url"
};
